package gui;

import java.awt.Color;
import java.awt.Dimension;

import java.awt.Rectangle;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.JButton;
import javax.swing.JFormattedTextField;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JPasswordField;
import javax.swing.JRadioButton;
import javax.swing.JOptionPane;

public class real_project extends JFrame implements ActionListener {
    JOptionPane option=new JOptionPane();
   private JPanel panel=new     JPanel();
    private JButton jButton6 = new JButton();
    private JFormattedTextField jFormattedTextField3 =
        new JFormattedTextField();
    private JButton jButton1 = new JButton();
    private JButton jButton2 = new JButton();
    private JButton jButton3 = new JButton();
    private JButton jButton4 = new JButton();
    private JButton jButton5 = new JButton();

    public real_project() {
        try {
            jbInit();
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    private void jbInit() throws Exception {
        panel.setLayout( null );
        this.setSize(new Dimension(561, 464));
        this.setVisible(true);
        
        this.setBackground(new Color(255, 165, 255));
        jButton6.setText("jButton6");

        jButton1.setText(" student registration");
        jButton1.setBounds(new Rectangle(115, 125, 150, 25));
        jButton1.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    jButton1_actionPerformed(e);
                }
            });
        jButton2.setText("register course");
        jButton2.setBounds(new Rectangle(115, 180, 150, 25));
        jButton2.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    jButton2_actionPerformed(e);
                }
            });
        jButton3.setText("insert course");
        jButton3.setBounds(new Rectangle(115, 295, 150, 25));
        jButton3.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    jButton3_actionPerformed(e);
                }
            });
        jButton4.setText("show registeried course");
        jButton4.setBounds(new Rectangle(115, 240, 150, 25));
        jButton4.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    jButton4_actionPerformed(e);
                }
            });
        jButton5.setText("exit");
        jButton5.setBounds(new Rectangle(430, 370, 75, 21));
        jButton5.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    jButton5_actionPerformed(e);
                }
            });
        panel.setBackground(Color.pink);
        panel.add(jButton5, null);
        panel.add(jButton4, null);
        panel.add(jButton3, null);
        panel.add(jButton2, null);
        panel.add(jButton1, null);
        add(panel);

    }


    public void actionPerformed(ActionEvent e) {
    }

    private void jButton1_actionPerformed(ActionEvent e) {
        //insert student page
        insertstudent s=new insertstudent();
        this.setVisible(false);
    }

    private void jButton2_actionPerformed(ActionEvent e) {
        //register student 
        registercourse s=new registercourse();
        this.setVisible(false);
    }

    private void jButton5_actionPerformed(ActionEvent e) {
        this.setVisible(false);
        this.setDefaultCloseOperation(EXIT_ON_CLOSE);
    }

    private void jButton3_actionPerformed(ActionEvent e) {
        insertcourse in=new insertcourse();
        this.setVisible(false);
    }

    private void jButton4_actionPerformed(ActionEvent e) {
        showregister sh=new showregister();
        this.setVisible(false);
    }
}

